<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<input id="btn" type="button" value="jQuery" />
		
		<script src="../js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			/* 
			window.onload = function(){
				// 返回的是dom对象
				var btn = document.getElementById('btn');
				var btns = document.getElementsByTagName('input');
				btn.onclick = function() {
					console.log('js onclick');
				}
				
				// domObj.style.backgroundColor = 'red';
			}
			 */
			
			// window.onload   $(function() {}); 都是页面加载完了之后执行
			
			/* 相当于js中window.onload,页面加载完了之后调用 */
			$(document).ready(function() {
				
			}) ;
			
			$(function() {
				// 返回jQuery封装的对象
				var btn = $('#btn');
				var btns = $('input');
				
				// jqueryObj.css('background-color', 'red');
				
				btn.click(function() {
					console.log('jQuery click');
				});
				
			});
		</script>
	</body>
</html>
